﻿<UserControl x:Class="ViCode_LeVi.Controls.VMTabMeasurement"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:vmcontrol="clr-namespace:ViCode_LeVi.Controls"
        xmlns:Langs="clr-namespace:ViCode_LeVi.Langs"
        xmlns:Data="clr-namespace:ViCode_LeVi.Data">
    <vmcontrol:VMRootControl  BorderThickness="10"> 
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
       
        <DockPanel Grid.Row="1" LastChildFill="True">
           
           
                <Button Name="Button_SortTile" Content="Sort Tile" Margin="2" VerticalAlignment="Center" />
                <Button Name="Button_SortStart" Content="Sort Start" Margin="2"  />
                <Button Name="Button_SortDuration" Content="Sort Duration" Margin="2" />
                <Button Name="Button_SortDaysRemaining" Content="Sort Remain" Margin="2" />
                <StackPanel HorizontalAlignment="Right" Orientation="Horizontal" DockPanel.Dock="Right">
                   <Button Name="Button_Add" Content="Add" Margin="2" Click="Button_Add_Click"/>
                    <Button Name="Button_Remove" Content="Delete" Margin="2" />
                    <Button Name="Button_Detail" Content="Detail" Margin="2" />
            </StackPanel>
        </DockPanel>
            <vmcontrol:VMListView x:Name="ListView_Measurement" IsSaveSetting="True" SaveSettingKey="VMTabMeasurement_ListView_Measurement"  SelectionMode="Single" 
                                  Margin="2" ItemsSource="{Binding Measurements_Source}" Grid.Row="0">
            <vmcontrol:VMListView.View>
                <GridView>
                        <GridViewColumn  DisplayMemberBinding="{Binding Name}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_Title_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                        <GridViewColumn  DisplayMemberBinding="{Binding IM_StartedDate}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_Start_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                        <GridViewColumn  DisplayMemberBinding="{Binding Duration}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_Duration_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                        <GridViewColumn  DisplayMemberBinding="{Binding Status}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_Status_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                    <GridViewColumn  DisplayMemberBinding="{Binding ResponsiblePerson}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_ResponsiblePerson_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                        <GridViewColumn  DisplayMemberBinding="{Binding DaysRemaining}">
                            <GridViewColumn.Header>
                                <vmcontrol:VMTextBlockExt_ControlTextInfoInData TextPath="Measurement_DaysRemaining_Text"/>
                            </GridViewColumn.Header>
                        </GridViewColumn>
                    </GridView>
            </vmcontrol:VMListView.View>
        </vmcontrol:VMListView>
            

     </Grid>
    </vmcontrol:VMRootControl>
</UserControl>
